home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20021006-20030409 / 000184_fdc@columbia.edu_Tue Dec 17 13:49:27 EST 2002.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  72 lines

  1. Article: 13966 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
  3. From: fdc@columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: Control characters with minput
  6. Date: 17 Dec 2002 13:46:00 -0500
  7. Organization: Columbia University
  8. Lines: 55
  9. Message-ID: <atnrd8$8o9$1@watsol.cc.columbia.edu>
  10. References: <6b84683a.0212171034.6c28e6fe@posting.google.com>
  11. NNTP-Posting-Host: watsol.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1040150774 8565 128.59.39.139 (17 Dec 2002 18:46:14 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 17 Dec 2002 18:46:14 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13966
  16.  
  17. In article <6b84683a.0212171034.6c28e6fe@posting.google.com>,
  18. EBH <ebh@burntmail.com> wrote:
  19. : I recently upgraded from kermit version 6.0.192 to kermit version
  20. : 8.0.206, and it seems to me that minput functions differently. I have
  21. : a kermit script that waits for an ENQ from the remote computer nad
  22. : sends a transaction is response to the ENQ.
  23. : I wrote the following code to search for ENQ or EOT and move to the
  24. : correct part of the script accordingly:
  25. : minput 60 \005 \004
  26. : switch \v(minput) {
  27. : :0, echo {*** No response received, redialing ***}, -
  28. :     goto RESTART, break
  29. : :1, echo {Transmitting \%c - \%k:\%m}, -
  30. :     goto ENQ, break
  31. : :2, echo {*** EOT received, redialing ***}, -
  32. :     goto RESTART, break
  33. : :default, echo {Invalid resonse: \v(input), sending NAK}, -
  34. :     increment num'enq, output \021, goto START
  35. : }
  36. : This worked fine in kermit 6.0.192, but in kermit 8.0.206 even though
  37. : I get a Ctrl-E and the command "echo \fcode(\v(input))" prints 5, but
  38. : the switch always executes the code for 0. And when I issue "echo
  39. : \v(minput)" it returns 0.
  40. : So, the question is as follows: Did this cahnge in kermit 7 or 8. And
  41. : if it did, how can use minput to search for multiple control
  42. : characters?
  43. :
  44. I guess it's a syntax quirk as the language has evolved over the years.
  45. Try it this way (in C-Kermit 8.0):
  46.  
  47.   minput 60 "\5" "\4"
  48.   switch \v(minput) {
  49.     :0, echo "*** No response received - redialing ***"
  50.       goto RESTART
  51.         break
  52.     :1, echo "Transmitting \%c - \%k:\%m"
  53.       goto ENQ
  54.         break
  55.     :2, echo "*** EOT received - redialing ***"
  56.       goto RESTART
  57.         break
  58.     :default
  59.         echo "Invalid resonse [\v(input)] - sending NAK"
  60.       increment num'enq
  61.         output \021
  62.         goto START
  63.   }
  64.   
  65. (Yes, the old way should still work but apparently it doesn't).
  66.  
  67. - Frank
  68.